import { RouteRecordRaw } from "vue-router";
import Home from "@/pages/Home.vue";
import Layout from "@/layout/index.vue";

 const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "Vue 组件",
    redirect:'/vue/uniapp',
    component: Layout,
    children:[
      {
        path:'/vue/uniapp',
        name:'uni-app 组件',
        component:Home,
        meta:{
          title:'uni-app 组件'
        }
      }
    ],
  },
  {
    path: "/react",
    name: "React 组件",
    redirect:'/react/index',
    component: Layout,
    children:[
      {
        path:'/react/index',
        name:'React 分类1',
        component:Home,
        meta:{
          title:'React'
        }
      }
    ],
  },
  {
    path: "/js",
    name: "Js 工具库",
    redirect:'/js/index',
    component: Layout,
    children:[
      {
        path:'/js/index',
        name:'Js分类1',
        component:Home,
        meta:{
          title:'Js'
        }
      }
    ],
  },
];

export default routes;